Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  


RE: Automate Replace Design in LotusScript?
~Umberto Nongeroson 11.Dec.03 11:35 AM a Web browser
Domino Designer 6.0.3 All Platforms


Apologies. I called it ReplaceDesign, but it only does a refresh. To do a replace, you change the design template name first. This is the name you see in the properties, not the file path of the NTF. If the server is Local, specify "", otherwise specify the server's canonical name. Something like:


    Const wAPIModule = "NNOTES" ' Windows
    Const NSF_INFO_SIZE = 128
    Const INFOPARSE_DESIGN = 3
    Const NOTE_ID_ICON = &HFFFF0010

    Declare Private Function DesignRefresh Lib wAPIModule Alias "DesignRefresh" _
    ( Byval S As String, Byval hDB As Long, Byval F As Long, Byval zA As Long, Byval zM As Long) As Integer

    Declare Private Function
    OSPathNetConstruct Lib wAPIModule Alias "OSPathNetConstruct" _
    ( Byval zP As Long, Byval S As String, Byval F As String, Byval N As String) As Integer

    Declare Private Function
    NSFDbInfoGet Lib wAPIModule Alias "NSFDbInfoGet" _
    ( Byval hDB As Long, Byval D As String) As Integer
    Declare Private Sub
    NSFDbInfoModify Lib wAPIModule Alias "NSFDbInfoModify" _
    ( Byval S As String, Byval W As Integer, Byval D As String)
    Declare Private Function
    NSFDbInfoSet Lib wAPIModule Alias "NSFDbInfoSet" _
    ( Byval hDB As Long, Byval D As String) As Integer

    Declare Private Function
    NSFDbOpen Lib wAPIModule Alias "NSFDbOpen" _
    ( Byval P As String, hDB As Long) As Integer
    Declare Private Function
    NSFDbClose Lib wAPIModule Alias "NSFDbClose" _
    ( Byval hDB As Long) As Integer

    Declare Private Function
    NSFItemSetText Lib wAPIModule Alias "NSFItemSetText" _
    ( Byval hNT As Long, Byval N As String, Byval D As String, Byval nD As Integer) As Integer

    Declare Private Function
    NSFNoteOpen Lib wAPIModule Alias "NSFNoteOpen" _
    ( Byval hDB As Long, Byval NoteID As Long, Byval F As Integer, hNT As Long) As Integer
    Declare Private Function
    NSFNoteClose Lib wAPIModule Alias "NSFNoteClose" _
    ( Byval hNT As Long) As Integer
    Declare Private Function
    NSFNoteUpdate Lib wAPIModule Alias "NSFNoteUpdate" _
    ( Byval hNT As Long, Byval F As Integer) As Integer


    Sub
    ReplaceDesign(templateserver$, templatename$, dbserver$, dbfilepath$)
    dp$ = String(1024, " ")
    OSPathNetConstruct 0, dbserver$, dbfilepath$, dp$

    Dim hDB As Long
    NSFDbOpen dp$, hDB
    If hDB = 0 Then Exit Sub

    d$ = Space(NSF_INFO_SIZE)
    NSFDbInfoGet hDB, d$
    NSFDbInfoModify d$
    , INFOPARSE_DESIGN, templatename$
    NSFDbInfoSet hDB
    , d$

    Dim hNT As Long
    NSFNoteOpen hDB, NOTE_ID_ICON, 0, hNT
    NSFItemSetText hNT
    , "$TITLE", d$, Instr(d$, Chr$(0))
    NSFNoteUpdate hNT, 0
    NSFNoteClose hNT

    DesignRefresh templateserver$
    , hDB, 1, 0, 0

    NSFDbClose hDB
    End Sub




Automate Replace Design in LotusScr... (~Fred Xanjumima... 10.Dec.03)
. . RE: Automate Replace Design in Lotu... (~Kirk Elreterod... 10.Dec.03)
. . . . RE: Automate Replace Design in Lotu... (~Fred Xanjumima... 10.Dec.03)
. . . . . . RE: Automate Replace Design in Lotu... (~Kirk Elreterod... 11.Dec.03)
. . . . . . . . RE: Automate Replace Design in Lotu... (~Fred Xanjumima... 11.Dec.03)
. . . . . . . . . . RE: Automate Replace Design in Lotu... (~Kirk Elreterod... 11.Dec.03)
. . . . . . . . . . . . RE: Automate Replace Design in Lotu... (~Fred Xanjumima... 11.Dec.03)
. . . . . . . . As long as you are naming the funct... (~Dan Elhipister... 11.Dec.03)
. . . . . . . . . . RE: As long as you are naming the f... (~Kirk Elreterod... 12.Dec.03)
. . . . . . . . RE: Automate Replace Design in Lotu... (~Lorraine Desge... 12.Dec.03)
. . . . . . . . . . RE: Automate Replace Design in Lotu... (~Kirk Elreterod... 12.Dec.03)
. . . . . . . . . . . . RE: Automate Replace Design in Lotu... (~Lorraine Desge... 15.Dec.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS